<div class="module-setting">
    <ol class="breadcrumb fn-clearfix">
        <li>参数配置</li>
    </ol>
    <div class="module-param">

        <div class="ui-box">
            <div class="form-container">
                <div class="body-title">入场券开关</div>
                <form class="form-inline ui-form"
                      role="form">
                    <div class="row">
                        <div class="col-md-1">
                            <span class="text">SMCF1</span>
                        </div>
                        <div class="col-md-1">
                            <span class="text">当前状态</span>
                        </div>

                        <div class="col-md-1" ng-if="vm.ticketStatus === 'ON'">
                            <span class="text">开启</span>
                        </div>
                        <div class="col-md-1" ng-if="vm.ticketStatus === 'OFF'">
                            <span class="text">关闭</span>
                        </div>


                        <div class="col-md-9" ng-if="vm.ticketStatus === 'ON'">
                            <a href="javascript:;"
                               class="btn btn-danger"
                               ng-click="vm.updateTicketStatus('OFF')">关闭</a>
                        </div>
                        <div class="col-md-9" ng-if="vm.ticketStatus === 'OFF'">
                            <div class="col-md-9">
                                <a href="javascript:;"
                                   class="btn btn-success"
                                   ng-click="vm.updateTicketStatus('ON')">开启</a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <div class="ui-box">
            <div class="body-title">服务时间配置(基金收益时间)</div>
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th width="10%">币种</th>
                    <th width="40%">开始时间</th>
                    <th width="30%">收益天数</th>
                    <th width="20%">结束时间</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-if="vm.isLoading === false">
                    <td>SMCF1</td>
                    <td>
                        <span class="text" style="margin-right: 16px;" ng-if="vm.fundBeginDate">
                            {{$root.moment(vm.fundBeginDate).format('YYYY-MM-DD HH:mm:ss')}}
                        </span>
                        <span class="text" style="margin-right: 16px;" ng-if="!vm.fundBeginDate">暂无</span>
                        <input type="text"
                               ng-model="vm.inputBeginDate"
                               style="display: inline-block; width: 200px;"
                               class="form-control">
                        <a href="javascript:;"
                           ng-click="vm.updateFundBeginDate()"
                           class="link">更新</a>
                    </td>
                    <td>
                        <span class="text" style="margin-right: 16px;">{{vm.fundDay || '--'}}天</span>
                        <input type="number"
                               ng-model="vm.inputFundDay"
                               style="display: inline-block; width: 100px;"
                               class="form-control">
                        <a href="javascript:;"
                           ng-click="vm.updateFundEndDate()"
                           class="link">更新</a>
                    </td>
                    <td>
                        <span class="text" style="margin-right: 16px;" ng-if="vm.fundEndDate">
                            {{$root.moment(vm.fundEndDate).format('YYYY-MM-DD HH:mm:ss')}}
                        </span>
                        <span class="text" style="margin-right: 16px;" ng-if="!vm.fundEndDate">暂无</span>
                    </td>
                </tr>
                <!--<tr class="ui-no-data" ng-if="vm.isLoading === false">-->
                    <!--<td colspan="4">暂无数据</td>-->
                <!--</tr>-->
                <tr class="ui-loading" ng-if="vm.isLoading === true">
                    <td colspan="4">正在加载，请稍候...</td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="ui-box">
            <div class="form-container">
                <div class="body-title">基金交易对状态配置</div>
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                        <th width="30%">交易对</th>
                        <th width="30%">状态</th>
                        <th width="40%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in vm.preList" ng-if="vm.isLoadingPre === false && vm.preList.length > 0">
                        <td>{{item.fundSymbol}}</td>
                        <td>
                            <span ng-if="item.status === vm.STATUS_PRE_OPEN">预售</span>
                            <span ng-if="item.status === vm.STATUS_HAS_OPEN">正常</span>
                        </td>
                        <td>
                            <div class="status-box" ng-if="item.status === vm.STATUS_HAS_OPEN">
                                <a href="javascript:;"
                                   ng-click="vm.update(item.fundAssetCode, item.tradeAssetCode, vm.STATUS_PRE_OPEN, '预售')"
                                   class="btn btn-success">预售</a>
                                <a href="javascript:;"
                                   disabled
                                   ng-click="vm.update(item.fundAssetCode, item.tradeAssetCode, vm.STATUS_HAS_OPEN, '正常')"
                                   class="btn btn-default">正常</a>
                            </div>
                            <div class="status-box" ng-if="item.status === vm.STATUS_PRE_OPEN">
                                <a href="javascript:;"
                                   disabled
                                   ng-click="vm.update(item.fundAssetCode, item.tradeAssetCode, vm.STATUS_PRE_OPEN, '预售')"
                                   class="btn btn-success">预售</a>
                                <a href="javascript:;"
                                   ng-click="vm.update(item.fundAssetCode, item.tradeAssetCode, vm.STATUS_HAS_OPEN, '正常')"
                                   class="btn btn-default">正常</a>
                            </div>
                        </td>
                    </tr>
                    <tr class="ui-no-data" ng-if="vm.isLoadingPre === false && (vm.list.length === 0||vm.list===null)">
                        <td colspan="3">暂无数据</td>
                    </tr>
                    <tr class="ui-loading" ng-if="vm.isLoadingPre === true">
                        <td colspan="3">正在加载，请稍候...</td>
                    </tr>
                    </tbody>
                </table>


            </div>
        </div>

    </div>
</div>
